Computer programs over the years have become more and more visually appealing using various graphical techniques. Aside from its main function, a typical computer program today has an enormous amount of graphical calculation going on under the hood. For example, programs often render fonts using resolution-independent vector graphics that can be easily scaled and manipulated with various transforms. Programs often render buttons and other graphical user interface (GUI) elements with a smooth, rounded edge, and so forth. To avoid interfering with the program, designers often strive to offload as much of the graphical burden to a dedicated Graphics Processing Unit (GPU) as possible. Curves are often approximated using cubic Bezier splines, and using the GPU to draw a cubic Bezier involves translation into a representation such as a set of triangles, a pixel shader, and a vertex shader that a GPU can draw.
One common type of drawing request that is difficult to handle in the GPU using existing techniques are stroked cubic Beziers. Cubic Beziers curves are a useful approximation for drawing thin curved lines. However, a stroke involves a thickness of the line whereby related lines some distance from the original are to be drawn and the space between the lines is to be filled. For example, a thick font or curved button with a shadow might involve a stroked cubic Bezier. On the other hand, very thin features, particularly at the sub-pixel level, are also difficult to draw using the GPU.
To support fast animation of cubic Beziers, any representation should remain scale independent and be reused when the transform has changed across frames. One known approach to solve this problem is the Loop/Blinn algorithm (Loop, Charles, and Jim Blinn. 2005. “Resolution Independent Curve Rendering using Programmable Graphics Hardware.” In ACM Transactions on Graphics (Proceedings of SIGGRAPH 2005) 24(3), pp. 1000-1008.), which evaluates the cubic Bezier in a pixel shader and enables resolution-independent drawing of cubic Beziers. Unfortunately, this approach is not capable of efficiently drawing stroked cubic Beziers curves, which are common in vector graphics. In particular, a stroke of a cubic Bezier is not itself a cubic Bezier and evaluating the distance from a cubic Bezier is not a simple operation to perform in a pixel shader. In addition, the Loop/Blinn algorithm is not suited to drawing thin features since it relies on non-overlapping curve decomposition, which is not always possible with a thin curve stroke. Even a thickness of one pixel may produce incorrect rendering results.
For artistic strokes, such as textures that follow the curve of a stroke, length along the curve can be used to texture map a stroke template along the curve. This information is not readily available with the Loop/Blinn algorithm in the pixel shader. Most scale-independent rendering solutions for MICROSOFT™ DIRECTX™ 9 hardware are based on the Loop/Blinn approach. More recent MICROSOFT™ DIRECTX™ 11 hardware can solve the problem with hardware tessellation using a multi-sample buffer. However, cutting-edge hardware is slowly adopted.